#ifndef __SaltUtil_H__
#define __SaltUtil_H__
#include <string>
#include <random>
using namespace std;
namespace wd
{
class SaltUtil
{
public:
   static string  generateSalt()
   {
     const std::string chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
     random_device rd;
     mt19937 generator(rd());
     uniform_int_distribution<>dist(0,chars.size()-1);

     string salt;
     for(int i=0;i<8;++i)
     {
         salt+=chars[dist(generator)];
     }
     return salt;
   }
};
}






#endif

